#ifdef	ADI_OLD

#ifndef	_JOBS_QUEUE_H_
#define	_JOBS_QUEUE_H_

#include <pthread.h>
#include <queue>
#include "Job.h"

using namespace std;

/*
 * Represents a synchronized queue of Jobs that will be accessed by some threads.
 */
class JobsQueue
{
  private:
	queue<Job*> jobs;
	pthread_mutex_t lock;
	pthread_cond_t cond;

  public:
	JobsQueue();

	~JobsQueue();

	/* Adds a job to the Jobs Queue */
	void addJob(Job *job);

	/* Makes the calling thread wait for a job */
	Job* waitForJob();

};


#endif	/* _JOBS_QUEUE_H_ */

#endif	/* ADI_OLD */
